import requests

# 发送post请求

class InterfaceTest03():
    @classmethod
    def get_wouniu(self):
        url = 'http://www.woniusb.com:8090/woniusales/user/login'
        # 构建请求参数
        data = {
            'username': 'admin',
            'password': 'admin123',
            'verifycode': '0000'
        }
        # 发送post请求 请求路径后跟参数
        resp = requests.post(url, data=data)
        print(resp.cookies)
        print(resp.status_code)
        print(resp.text)

    @classmethod
    def search(self):
        url = 'http://www.woniusb.com:8090/woniusales/query/zerostored'
        # 构建请求参数
        data = {
            'page': 1
        }

        # 发送post请求 请求路径后跟参数
        req = requests.post(url, data)
        print(req.status_code)
        print(req.text)


if __name__ == '__main__':
    InterfaceTest03.get_wouniu()
    InterfaceTest03.search()
